﻿using System;
using System.Collections.Generic;
using System.Text;

using Asp = System.Web;

namespace Daco.Web.UI
{
    public class DACOHeader : Asp.UI.Control, IDACOHeader
    {
        public System.Web.UI.Control ThisControl
        {
            get { return this; }
        }

        public DACOHeader()
        {
            //this.Load += new EventHandler(DACOHeader_Load);
        }

        void DACOHeader_Load(object sender, EventArgs e)
        {
            
        }

        protected override void Render(Asp.UI.HtmlTextWriter writer)
        {
            writer.Write(
                @"
            <!-- Begin header -->
            <div style=""height: 122px; margin: 0;"">
                <div style=""background: url('"); writer.Write(Page.ResolveUrl(string.Format("~/App_Themes/{0}/Images/Logo.png", Page.Theme))); writer.Write(@"') no-repeat left top;"">
                    <div style=""margin-left: 0;"">
                        <script type=""text/javascript"" language=""javascript"">
                            //$(document).ready(function(){
                                document.write(ShowFlashObject('"); writer.Write(Page.ResolveUrl("~/Uploads/Flashes/Banner.swf")); writer.Write("', 1000, 120));");
            writer.Write(@"
                            //});
                        </script>
                    </div>
                </div>
            </div>
            <div style=""margin: 0; height: 7px; background: red;""></div>
            <!-- End header -->");
        }
    }
}
